
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">

 <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">出差申请反馈</h2>
    </div>
    <!-- 标题 -->
    <form method="post" id="f1">
    <input type="hidden" name="aid" value="{$apply.id}"/>
     <table class="table table-bordered text-center bud_hei" style="margin-bottom: 0">
        <tr>
          <td style="min-width: 160px;width: 160px">类型</td>
            <td class="text-left" colspan="3">{if $apply.traveltype==1}周边行程{else/}出差{/if}</td>
        </tr>
        <tr>
            <td style="min-width: 160px;width: 160px">编号</td>
            <td class="text-left">{$apply.no}</td>
            <td style="min-width: 160px;width: 160px">申请时间</td>
            <td class="text-left">{$ctime}</td>
        </tr>
          <tr>
            <td style="min-width: 160px;width: 160px">部门</td>
            <td class="text-left">{$user.de_name}</td>
            <td style="min-width: 160px;width: 160px">状态</td>
            <td class="text-left">{$state}</td>
        </tr>
         <tr>
            <td style="min-width: 160px;width: 160px">姓名</td>
            <td class="text-left">{$user.em_name}</td>
            <td style="min-width: 160px;width: 160px">职务</td>
            <td class="text-left">{$user.role_name}</td>
        </tr>
          <tr>
            <td style="min-width: 160px;width: 160px">
            拜访客户
            </td>
            <td class="text-left">
              {if $apply.baifang=="1"}经销客户{elseif $apply.baifang=="2"/}直营客户{elseif $apply.baifang=="1,2"/}经销客户,直营客户{/if}
            </td>
            <td style="min-width: 160px;width: 160px">职务代理人</td>
            <td class="text-left">{if $daili}{$daili.em_name}{/if}</td>
        </tr>
          <tr>
            <td style="min-width: 160px;width: 160px" class="font-bold">主题</td>
            <td class="text-left">{$apply.title}</td>
            <td style="min-width: 160px;width: 160px">预估差旅费用</td>
            <td class="text-left ObjectNum">{$apply.feiyong}</td>
        </tr>
    </table>
      <table class="table table-bordered text-left bud_hei" style="margin:2px 0">
		<tr>
			<th class="text-center">起止时间</td>
			<th class="text-center">结束时间</td>
			<th class="text-center">出发地</td>
			<th class="text-center">目的地</td>
			<th class="text-center">天数</td>
			<th class="text-center">点对点公里数</td>
			<th class="text-center">发车/起飞时间<br>时：分,如：09：30</td>
			<th class="text-center">交通工具</th>
			<th class="text-center">点对点乘车<br>所需时间(小时)</th>
			<th class="text-center">陪同人员</th>
		</tr>
    {volist name="de" id="d"}
    <tr>
      <td>{$d.start}</td>
      <td>{$d.end}</td>
      <td>{$d.chufa}</td>
      <td>{$d.mudi}</td>
      <td>{$d.ts}</td>
      <td>{$d.gl}</td>
      <td>{$d.qishi}</td>
      <td>{if $d.fangshi==0}火车{elseif $d.fangshi==1}轮渡{elseif $d.fangshi==2}飞机{elseif $d.fangshi==3}大巴{elseif $d.fangshi==4}自驾车{else/}其他{/if}</td>
      <td>{$d.shijian}</td>
      <td>{$d.peitongren}</td>
    </tr>
    {/volist}
		
		
      </table>
       <table class="table table-bordered text-left bud_hei" style="margin:2px 0">
       	<tr>
			<td style="width: 160px" class="text-center">行程目的<br>(需要解决的问题)</td>
			<td>
				{$apply.target}
			</td>
       	</tr>
       	<tr>
			<td style="width: 160px" class="text-center">反馈信息</td>
			<td>
          <div class="ibox float-e-margins" style="margin-bottom: 0">
                        <div class="ibox-content no-padding">

                            <textarea class="summernote" id="fankui" name="fankui"></textarea>

                        </div>
                    </div>
      </td>
       	</tr>
       </table>
       <table class="table table-bordered text-left bud_hei">
            <tr class="info">
                <th class="text-left font-bold">审批意见</th>
            </tr>
            {volist name="logs" id="l"}
          <tr>
              <td>{$l.USERNAME} 审批动作：{$l.MEMO}；审批意见：{if $l.COMMENTS}{$l.COMMENTS}{else/}无{/if}(审批时间：{$l.ACTIONTIME})</td>
          </tr>
          
          {/volist}
      </table>
      {if $apply.fujian}
        <h3>附件列表</h3>
        <div class="row">
          {volist name="fujian" id="f"}
            <a onclick="down({$f.id})">{$f.file_name}</a>&nbsp;&nbsp;
          {/volist}
        </div>
        <br/></br/>
      {/if}
      {if $apply.state==7}
       <div class="SuccessImg font-bold">
        已&nbsp;生&nbsp;效
      </div> 
      {/if}
         <div class="padding-10 text-center">
          <button class="btn btn-primary" type="button" onclick="baocun()">提交</button><span class="lr_5"></span>
         
          <button class="btn btn-warning" type="button" id="fanhui">返回</button></div>
      <br/></br/>
      </form>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
        <script src="__STATIC__/layout/js/common.js"></script>
        <script src="__STATIC__/layout/js/plugins/summernote/summernote.min.js"></script>
<script src="__STATIC__/layout/js/plugins/summernote/summernote-zh-CN.js"></script>
        <script>
        function baocun(state){
  
  $("#fankui").val($("#fankui").code());
   $.ajax({
          cache: true,
          type: "POST",
          url:"{:url('fankuichuli')}",
          data:$('#f1').serialize(),// 你的formid
          async: false,
          error: function(request) {
            alert("Connection error");
          },
          success: function(data) {
            //alert(data);
            //var res=JSON.parse(data);
                    var res1=JSON.parse(data);
                            if(res1["state"]==1){
                              swal({
                                title: "完成",
                                text: "操作已成功",
                                type: "success"
                                },function(){
                                  parent.location.href="{:url('mychuchai')}"
                                  //parent.layer.close(parent.layer.getFrameIndex(window.name))
                                  //
                                });

                          }else{
                            swal({
                            title: "错误",
                            text:  res1["msg"],
                            type: "warning"
                            });
                          }             
          }
        });
}
        function down(id){
          window.open("{:url('download_fujian')}?fid="+id)
        }
                $(document).ready(function(){
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
                 $('.summernote').summernote({
                      lang: 'zh-CN'
                  });
        })
                 $('#fanhui').on('click',function () {
//                    parent.layer.close(parent.layer.getFrameIndex(window.name))
                    parent.location.reload();
                    return false
                })
        </script>
</body>

</html>
